package com.app.megaprosoft.modyimcarcare;

import com.megaprosoft.modyimcarcare.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class CarCare_Adapter_ItemGroupMain extends BaseAdapter 
{
    private Context context;
    private String[][] lis;
    
    public CarCare_Adapter_ItemGroupMain(Context c, String[][] li) 
    {
    	// TODO Auto-generated method stub
        context = c;
        lis = li;
    }
    public int getCount() {
    	// TODO Auto-generated method stub
    	try{
    		 return lis.length;
		}catch(Exception e){
			return 0;
		}
    }
    public Object getItem(int position) {
    	// TODO Auto-generated method stub
        return position;
    }
    public long getItemId(int position) {
    	// TODO Auto-generated method stub
        return position;
    }
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		LayoutInflater inflater = (LayoutInflater) context
				.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		if (convertView == null) {
			convertView = inflater.inflate(R.layout.list_itemgroupmain, null); 
		}
		// ColName
		TextView txtName = (TextView) convertView.findViewById(R.id.ColName);
		txtName.setPadding(0, 0, 0, 0);
		txtName.setText(lis[position][2].toString());
		
		return convertView;
	}
} 